package com.monkeys.mapper;

import com.monkeys.pojo.DemandsList;
import org.apache.ibatis.annotations.*;

/**
 * @author KuangTeam
 */
@Mapper
public interface DemandsListMapper {

    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    @Insert("insert into demands_list (demandsListStr) values (#{demandsListStr})")
    void insert(DemandsList demandsList);

    //删除全部信息
    @Delete("delete from demands_list")
    void deleteAll();

    //根据id获取
    @Select("select * from demands_list where id = #{demandsListId}")
    DemandsList selectById(Long demandsListId);
}
